﻿<button class="btn btn-success" ng-click="editUser('new')">
  <span class="glyphicon glyphicon-user"></span> Create New User
</button>
<hr>

<div ng-show="edit || add">
<h3 ng-show="add">Create New User:</h3>
<h3 ng-show="edit">Edit User:</h3>

<form class="form-horizontal">
<div class="form-group">
  <label class="col-sm-2 control-label">Username:</label>
  <div class="col-sm-10">
    <input type="text" ng-model="user.username" ng-disabled="!add" placeholder="Username">
  </div>
</div> 
<div class="form-group">
  <label class="col-sm-2 control-label">Email:</label>
  <div class="col-sm-10">
    <input type="email" ng-model="user.email" ng-disabled="!add" placeholder="Email">
  </div>
</div>
<div class="form-group">
  <label class="col-sm-2 control-label">Password:</label>
  <div class="col-sm-10">
    <input type="password" ng-model="user.passw1" placeholder="Password">
  </div>
</div>
<div class="form-group">
  <label class="col-sm-2 control-label">Repeat:</label>
  <div class="col-sm-10">
    <input type="password" ng-model="user.passw2" placeholder="Repeat Password">
  </div>
</div>
<input type="hidden" ng-model="user.id">
</form>

<hr>
<button class="btn btn-success" ng-disabled="error || incomplete"  ng-click="saveUser()"> <!---->
  <span class="glyphicon glyphicon-save"></span> Save Changes
</button>
</div>
